package com.example.framework.picasso.activity;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.TextView;

import com.example.framework.R;
import com.example.framework.picasso.adapter.PicassoTransformationsAdapter;

import java.util.ArrayList;
import java.util.List;


public class PicassoTransfromationsActivity extends Activity
{
      TextView tvTitle ;
      ListView lvPicassoTransfromations ;
      
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_picasso_transfromations);
             tvTitle = findViewById(R.id.tv_title);
             lvPicassoTransfromations = findViewById(R.id.lv_picasso_transfromations);
            initData();
      }
      
      private void initData()
      {
            // 标题
            tvTitle.setText("Picasso的转换操作");
            
            List<String> data = new ArrayList<>();
            
            for (int i = 1; i <= 36; i++)
            {
                  data.add(i + "");
            }
            
//            // 初始化listview
           PicassoTransformationsAdapter picassoTransformationsAdapter = new PicassoTransformationsAdapter(PicassoTransfromationsActivity.this, data);
//
           lvPicassoTransfromations.setAdapter(picassoTransformationsAdapter);
      }
}
